//
// Created by 17775 on 2024/7/30.
//

#ifndef RAYCI_IGENERALCALIBRATION_H
#define RAYCI_IGENERALCALIBRATION_H


class IGeneralCalibration {
public:
    virtual ~IGeneralCalibration() {

    }
    virtual bool isCalibrated() const = 0;

    virtual double getY(double x) const = 0;

    virtual double getX(double Y) const = 0;

    static bool isInfinity(double d)
    {
        return (*(unsigned long long*)(&d) & 0x7FFFFFFFFFFFFFFFLL) == 9218868437227405312ULL;
    }

    static bool isNaN(double d)
    {
        return (*(unsigned long long*)(&d) & 0x7FFFFFFFFFFFFFFFL) > 9218868437227405312ULL;
    }
};


#endif //RAYCI_IGENERALCALIBRATION_H
